package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RatingsReviewsMapper;
import com.ruoyi.system.domain.RatingsReviews;
import com.ruoyi.system.service.IRatingsReviewsService;

/**
 * 评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-24
 */
@Service
public class RatingsReviewsServiceImpl implements IRatingsReviewsService 
{
    @Autowired
    private RatingsReviewsMapper ratingsReviewsMapper;

    /**
     * 查询评价
     * 
     * @param reviewId 评价主键
     * @return 评价
     */
    @Override
    public RatingsReviews selectRatingsReviewsByReviewId(Long reviewId)
    {
        return ratingsReviewsMapper.selectRatingsReviewsByReviewId(reviewId);
    }

    /**
     * 查询评价列表
     * 
     * @param ratingsReviews 评价
     * @return 评价
     */
    @Override
    public List<RatingsReviews> selectRatingsReviewsList(RatingsReviews ratingsReviews)
    {
        return ratingsReviewsMapper.selectRatingsReviewsList(ratingsReviews);
    }

    /**
     * 新增评价
     * 
     * @param ratingsReviews 评价
     * @return 结果
     */
    @Override
    public int insertRatingsReviews(RatingsReviews ratingsReviews)
    {
        return ratingsReviewsMapper.insertRatingsReviews(ratingsReviews);
    }

    /**
     * 修改评价
     * 
     * @param ratingsReviews 评价
     * @return 结果
     */
    @Override
    public int updateRatingsReviews(RatingsReviews ratingsReviews)
    {
        return ratingsReviewsMapper.updateRatingsReviews(ratingsReviews);
    }

    /**
     * 批量删除评价
     * 
     * @param reviewIds 需要删除的评价主键
     * @return 结果
     */
    @Override
    public int deleteRatingsReviewsByReviewIds(Long[] reviewIds)
    {
        return ratingsReviewsMapper.deleteRatingsReviewsByReviewIds(reviewIds);
    }

    /**
     * 删除评价信息
     * 
     * @param reviewId 评价主键
     * @return 结果
     */
    @Override
    public int deleteRatingsReviewsByReviewId(Long reviewId)
    {
        return ratingsReviewsMapper.deleteRatingsReviewsByReviewId(reviewId);
    }
}
